package com.huashi.dealer.commonEntity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户收货地址表
 * 对应数据库表：yoshop_user_address
 *
 * @author 系统生成
 * @since 2025-01-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("yoshop_user_address")
@Schema(description = "用户收货地址表")
public class UserAddress extends BaseModel implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "address_id", type = IdType.AUTO)
    @Schema(description = "主键id")
    private Integer addressId;

    /**
     * 收货人姓名
     */
    @Schema(description = "收货人姓名")
    private String name;

    /**
     * 联系电话
     */
    @Schema(description = "联系电话")
    private String phone;

    /**
     * 所在省份id
     */
    @TableField("province_id")
    @Schema(description = "所在省份id")
    private Integer provinceId;

    /**
     * 所在城市id
     */
    @TableField("city_id")
    @Schema(description = "所在城市id")
    private Integer cityId;

    /**
     * 所在区id
     */
    @TableField("region_id")
    @Schema(description = "所在区id")
    private Integer regionId;

    /**
     * 新市辖区(该字段用于记录region表中没有的市辖区)
     */
    @Schema(description = "新市辖区(该字段用于记录region表中没有的市辖区)")
    private String district;

    /**
     * 详细地址
     */
    @Schema(description = "详细地址")
    private String detail;

    /**
     * 用户id
     */
    @TableField("user_id")
    @Schema(description = "用户id")
    private Integer userId;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @Schema(description = "创建时间")
    private Long createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @Schema(description = "更新时间")
    private Long updateTime;
    

    /**
     * 地区信息
     */
    @Schema(description = "地区信息")
    @TableField(exist = false)
    private String region;
    
} 